<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动</title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        body{
            font: 20px "微软雅黑";
        }
        ul{
            list-style: none;
        }
        a{
            text-decoration: none;
            color: #000;
        }
        .clearfix:after{
            content: "";
            display: block;
            clear: both;
        }
        ul{
            float: right;
            border: 5px solid red;
        }
        li{
            float: left;
            width: 200px;
            height: 200px;
            border: 5px solid orange;
        }
    </style>
</head>
<body>
<ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
</ul>
</body>
</html>